package com.syeet.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.syeet.common.utils.PageUtils;
import com.syeet.gulimall.member.entity.MemberEntity;
import com.syeet.gulimall.member.exception.PhoneExistException;
import com.syeet.gulimall.member.exception.UsernameExistException;
import com.syeet.gulimall.member.vo.MemberLoginVo;
import com.syeet.gulimall.member.vo.MemberRegistVo;
import com.syeet.gulimall.member.vo.SocailUser;

import java.util.Map;

/**
 * 会员
 *
 * @author xhl
 * @email 119495@qq.com
 * @date 2022-04-30 13:24:11
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     *  注册会员
     * @param vo
     */

    void regist(MemberRegistVo vo);

    /**
     * @param phone
     * @throws PhoneExistException
     */
    void checkPhoneUnique(String phone) throws PhoneExistException;

    /**
     * @param userName
     * @throws UsernameExistException
     */
    void checkUserNameUnique(String userName) throws UsernameExistException;


    MemberEntity login(MemberLoginVo vo);

    MemberEntity login(SocailUser vo) throws Exception;

}

